﻿using System;
using CommonCodeManagers.Model;
using CommonCodeManagers.plugin;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Newtonsoft.Json;

namespace CodeTest
{
    [TestClass]
    public class UnitTest1
    {
        [TestMethod]
        public void TestMethod1()
        {
            var jsonStr = JsonConvert.SerializeObject(new GitAccount()
            {
                Name = "",
                Email = "",
                UserName = "",
                Password = "",
                Reposity = "https://gitee.com/zkqqkz/codejson.git"
            });
            string res = DESEncrypt.Encrypt(jsonStr);
            string res2 = DESEncrypt.Decrypt(res);
            Assert.AreEqual(jsonStr, res2);
        }
    }
}
